﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SiteTwoColumn.Master" Inherits="System.Web.Mvc.ViewPage<Beeldbankmvc.ViewModels.MediaObjectViewModel>" %>

<%@ Import Namespace="Beeldbankmvc.Code" %>
<%@ Import Namespace="Beeldbankmvc.Controllers" %>
<%@ Import Namespace="Beeldbankmvc.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <%: AppHelper.convertHtmlStringToAltTag(Model.MediaObject) + " ID" + Model.MediaObject.Id%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderRightColumn" runat="server">
    <%
    if (Model.MediaObject.TypeId == (int)Mediatypes.MediaTypes.video_animation)
    { %>
    <!-- Video //-->
    <div id="bestellen">
        <h2 class="sizeOfH1">Bestellen</h2>
        <%
        using (Html.BeginForm())
        {%>
        <fieldset>
            <legend>bestellen</legend>
            <%
            if (Model.AvailableFormats != null)
            { %>
                <h3>
                    Toevoegen aan winkelwagen<br />
                    Stap 2 van 2
                </h3>
                <p>
                    <label for="AvailableTypes">Uitlevering als</label><br />
                    <%: Html.DropDownList("AvailableTypes")%>
                    <input class="kiesbutton" type="submit" name="submit" value="Kies" />
                </p>
                <p>
                    <label for="AvailableFormats">Formaat</label><br />
                    <%: Html.DropDownList("AvailableFormats")%>
                </p>
                <%
                if (Model.AvailableFinishing != null)
                {
                %>
                    <p>
                        <label for="AvailableFinishing">Afwerking</label><br />
                        <%: Html.DropDownList("AvailableFinishing")%>
                    </p>
                <%
                }
                %>
                <p>
                    <label for="aantal">Aantal</label><br />
                    <input type="text" name="aantal" id="aantal" class="date" value="1" size="5" />
                    <input class="bestelbutton" type="submit" name="submit" value="Bestellen" />
                </p>
            <%
            }
            else
            { %>
                <h3>
                    Toevoegen aan winkelwagen<br />
                    Stap 1 van 2
                </h3>
                <p>
                    <label for="AvailableTypes">Uitlevering als</label><br />
                    <%: Html.DropDownList("AvailableTypes")%>
                    <input class="kiesbutton" type="submit" name="submit" value="Kies" />
                </p>
            <%
            }
            %>
        </fieldset>
        <%
        }
        %>
    </div>
    <%
    }
    else
    { %>
        <!-- Analoog / digitaal //-->
        <div id="bestellen">
            
            <%
            using (Html.BeginForm())
            {%>
                <%: Html.ValidationSummary(true) %>
                <fieldset>
                    <legend>bestellen</legend>

                    <% 
                    bool hasFullImage = Beeldbankmvc.Helpers.Tools.hasFullImage(Model.MediaObject);
                    bool hasFullDownload = Beeldbankmvc.Helpers.Tools.hasFullDownload(Model.MediaObject);

                    if (hasFullImage || hasFullDownload)
                    {%>
                        <h2 class="sizeOfH1">Download gratis</h2>
                        <p>
                            <%
                            if (hasFullImage) 
                            { %>
                                <label for="download">
                                    <%= Beeldbankmvc.Helpers.Tools.getFullImageDownloadLink(Model.MediaObject)%><br />
                                </label>
                            <%
                            } 
                            if (hasFullDownload)
                            { %>
                                <br />
                                <br />
                                <label for="download">
                                    <%= Beeldbankmvc.Helpers.Tools.getFullDownloadLink(Model.MediaObject)%><br />
                                </label>
                            <%
                            } %>
                            <br />
                            <br />
                        </p>
                    <%
                    } 
                    if (
                        (Model.MediaObject.TypeId == (int)Mediatypes.MediaTypes.analog)
                        ||
                        (
                            (Model.MediaObject.TypeId == (int)Mediatypes.MediaTypes.digital) &&
                            (Model.MediaObject.Archiefnummer.HasValue && (Model.MediaObject.Archiefnummer.ToString().Length > 0)) &&
                            (Model.MediaObject.Subnummer.HasValue && (Model.MediaObject.Subnummer.ToString().Length > 0)) &&
                            (!String.IsNullOrEmpty(Model.MediaObject.Mapnummer) && (Model.MediaObject.Mapnummer.Length > 0))
                        )
                        )
                    {
                        if (Model.AvailableFormats != null)
                        { %>
                            <h2 class="sizeOfH1">Bestel hogere resolutie</h2>
                            <h3>
                                Toevoegen aan winkelwagen<br />
                                Stap 2 van 2
                            </h3>
                            <p>
                                <label for="AvailableTypes">
                                    Uitlevering als</label><br />
                                <%: Html.DropDownList("AvailableTypes")%>
                                <input class="kiesbutton" type="submit" name="submit" value="Kies" />
                            </p>
                            <p>
                                <label for="AvailableFormats">
                                    Formaat</label><br />
                                <%: Html.DropDownList("AvailableFormats")%>
                            </p>
                            <p>
                                <input class="bestelbutton" type="submit" name="submit" value="Bestellen" />
                            </p>
                        <%
                        }
                        else
                        { %>
                            <h2 class="sizeOfH1">Bestel hogere resolutie</h2>
                            <h3>
                                Toevoegen aan winkelwagen<br />
                                Stap 1 van 2
                            </h3>
                            <p>
                                <label for="AvailableTypes">
                                    Uitlevering als</label><br />
                                <%: Html.DropDownList("AvailableTypes")%>
                                <input class="kiesbutton" type="submit" name="submit" value="Kies" />
                            </p>
                        <%
                        } %>
                    <%
                    } %>
                </fieldset>
            <%
            } %>
        </div>
    <%
    } %>
    <%
    if (Model.GoogleMaps.Length > 0)
    { %>
        <div id="GPS">
            <br /><br />
            <h2 class="sizeOfH1">Lokatiegegevens</h2>
            <%if ((Model.mapId > 0) && (ConfigurationManager.AppSettings["ShowDetailMap"] == "true"))
            {%>
                <%=Url.Image<GebiedController>(c => c.DisplayOneDotOnMap(Model.mapId, Model.MediaObject.Id), 216, "Interne doorverwijzing naar de detailkaart waar dit object zich bevindt.", "Interne doorverwijzing naar de detailkaart waar dit object zich bevindt.", "/Gebied/SelectYear?id=" + Model.mapId + "&year=" + Model.MediaObject.Datum_Realisatie.Value.Year)%>
                <a href=" /Gebied/SelectYear?id=<%: Model.mapId %>&amp;year=<%: Model.MediaObject.Datum_Realisatie.Value.Year %>" title="Interne doorverwijzing naar de detailkaart waar dit object zich bevindt.">Meer foto's in deze omgeving</a><br />
                <%
            } %>
            <%=Model.GoogleMaps%>
        </div>
    <%
    } %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderMiddleColumn" runat="server">
    <div id="detail">
        <h1 class="h1Compact">
            <%: AppHelper.convertHtmlStringToAltTag(Model.MediaObject) + " ID" + Model.MediaObject.Id%>
        </h1>
        <%
        using (Html.BeginForm())
        {%>
            <p>
                <%
                if (Model.hasPreviousPage)
                {  %>
                    <input type="submit" name="submit" value="Vorige" class="volgendebutton" />
                    <span class="lijstlinks"> | </span>
                <%
                }
                if (Model.hasSearchResults)
                { %>
                    <input type="submit" name="submit" value="Resultaten" class="volgendebutton" />
                <%
                }
                if (Model.hasMapResults)
                { %>
                    <input type="submit" name="submit" value="Kaart" class="volgendebutton"/>
                <%
                } 
                if (Model.hasNextPage)
                {  %>
                    <span class="lijstlinks"> | </span>
                    <input type="submit" name="submit" value="Volgende" class="volgendebutton" />
                <%
                } %>
            </p>
        <%
        }
        // todo: move this check to the controler/viewmodel
        if (Membership.GetUser() != null)
        {
            if (Model.CanBeEditedByCurrentUser || (Roles.IsUserInRole("Administrator")) || (Model.MediaObject.modifiedby.ToLower() == Membership.GetUser().UserName.ToLower()) || (Model.MediaObject.createdby.ToLower() == Membership.GetUser().UserName.ToLower()))
            { %>
                <div style="float: right; margin-right: 24px;">
                    <%
                    if (Model.MultipleRecordsExistWithCurrentTitle)
                    {%>
                        <img src="<%=AppHelper.getContent("~/Content/images/copy.gif") %>" alt="merge" /><%: Html.ActionLink("merge", "Merge", "MediaObject", new { id = Model.MediaObject.Id }, new { onclick = "return confirm('Dit media object zal permanent worden verwijderd en de omschrijving zal verplaatst worden naar het eerstvolgende mediaobject met hetzelfde inventarisnummer. Weet u het zeker?');" })%>
                    <%
                    } %>
                    <img src="<%=AppHelper.getContent("~/Content/images/delete.gif") %>" alt="delete kruisje" /><%: Html.ActionLink("delete", "Delete", "MediaObject", new { id = Model.MediaObject.Id }, new { onclick = "return confirm('Dit media object zal permanent worden verwijderd, weet u het zeker?');" })%>
                    <img src="<%=AppHelper.getContent("~/Content/images/edit.gif") %>" alt="edit potloodje" /><%: Html.ActionLink("edit", "Edit", "MediaObject", new { id = Model.MediaObject.Id }, null)%>
                </div>
            <%
            }
        } %>
        <br />
        <fieldset>
            <legend>Detailpagina</legend>
            <%
            if (Model.MediaObject.TypeId == (int)Mediatypes.MediaTypes.video_animation)
            { %>
                <div class="moviecontent">
                    <!-- description for the movie (optional) -->
                    <div id="mediaplayer">
                        <%=Url.Image<HomeController>(c => c.DisplayThumb(Model.MediaObject.Id.ToString()), 400, AppHelper.convertHtmlStringToAltTag(Model.MediaObject))%>
                    </div>
                    <!-- dynamic insertion of mediaplayer for this mediaobject -->

<script type="text/javascript">
    jwplayer('mediaplayer').setup({
        // todo: logo: '/Content/images/logos/Rijksoverheid_logo.png',

        <%= Beeldbankmvc.Helpers.Tools.writeMovieJWPlayer(Model.MediaObject,"movies")%> // todo: video switcher
        <%= Beeldbankmvc.Helpers.Tools.writeMovieJWPlayer(Model.MediaObject,"jpg")%>
        <%= Beeldbankmvc.Helpers.Tools.writeMovieJWPlayer(Model.MediaObject,"layout")%>
        tracks: [{
            <%= Beeldbankmvc.Helpers.Tools.writeMovieJWPlayer(Model.MediaObject,"caption")%>
            label: "Nederlands",
            kind: "captions",
            "default": true
        }]
    });
    jwplayer().onPlay(function() { 
        $.get('<%=Beeldbankmvc.Helpers.Tools.getCounterView()%><%= Model.MediaObject.Id %>?ts=<%= DateTime.Now.Millisecond.ToString() %>');
    });  

    // EXAMPLE : jwplayer('mediaplayer').addButton('<%= AppHelper.getContent("~/Content/images/novoice.png")%>', 'Gesproken tekst toevoegen', function(){addVoice();}, 'voiceaudio');
    <%= Beeldbankmvc.Helpers.Tools.writeMovieJWPlayer(Model.MediaObject,"movievoicebutton")%>

    function addVoice()
    {
        // EXAMPLE : jwplayer('mediaplayer').load([{file:"http://localhost/Video/2849/427426_voice.mp4"}]);
        jwplayer('mediaplayer').load([{<%= Beeldbankmvc.Helpers.Tools.writeMovieJWPlayer(Model.MediaObject,"moviesvoice")%>}]);
        jwplayer('mediaplayer').removeButton('voiceaudio');
        jwplayer('mediaplayer').addButton('<%= AppHelper.getContent("~/Content/images/voice.png")%>', 'Gesproken tekst verwijderen', function(){removeVoice();}, 'novoiceaudio');
    }
    function removeVoice()
    {
        jwplayer('mediaplayer').load([{<%= Beeldbankmvc.Helpers.Tools.writeMovieJWPlayer(Model.MediaObject,"movies")%>}]);
        jwplayer('mediaplayer').removeButton('novoiceaudio');
        jwplayer('mediaplayer').addButton('<%= AppHelper.getContent("~/Content/images/novoice.png")%>', 'Gesproken tekst toevoegen', function(){addVoice();}, 'voiceaudio');
    }      
</script>

               
                    






                    <%-- Old flash player
                     <script type='text/javascript'>
                        jwplayer('mediaplayer').setup({
                            <%= Beeldbankmvc.Helpers.Tools.writeMovieJWPlayer(Model.MediaObject,"jpg")%>
                            <%= Beeldbankmvc.Helpers.Tools.writeMovieJWPlayer(Model.MediaObject,"accessibility")%>
                            <%= Beeldbankmvc.Helpers.Tools.writeMovieJWPlayer(Model.MediaObject,"layout")%>   
                           
                            <%= Beeldbankmvc.Helpers.Tools.writeMovieJWPlayer(Model.MediaObject,"movies")%>

                        });
                        jwplayer().onPlay(function() { 
                            $.get('<%=Beeldbankmvc.Helpers.Tools.getCounterView()%><%= Model.MediaObject.Id %>?ts=<%= DateTime.Now.Millisecond.ToString() %>');
                        });  
                    </script>
                    --%>
                </div>
            <%
            } %>
            <dl>
                <%
                if (Model.MediaObject.TypeId == (int)Mediatypes.MediaTypes.video_animation)
                { %>
                    <dt class="display-label">Download</dt>
                    <dd class="display-field">
                        <%= Beeldbankmvc.Helpers.Tools.writeMovieDownloadLink(Model.MediaObject,"HQ mp4")%>
                        <%= Beeldbankmvc.Helpers.Tools.writeMovieDownloadLink(Model.MediaObject,"mp4")%>
                        <%= Beeldbankmvc.Helpers.Tools.writeMovieDownloadLink(Model.MediaObject,"m4v")%>
                        <%= Beeldbankmvc.Helpers.Tools.writeMovieDownloadLink(Model.MediaObject,"mov")%>
                        <%= Beeldbankmvc.Helpers.Tools.writeMovieDownloadLink(Model.MediaObject,"3gp")%>
                        <%= Beeldbankmvc.Helpers.Tools.writeMovieDownloadLink(Model.MediaObject,"wmv")%>
                        <%= Beeldbankmvc.Helpers.Tools.writeMovieDownloadLink(Model.MediaObject,"mpg")%>
                        <%= Beeldbankmvc.Helpers.Tools.writeMovieDownloadLink(Model.MediaObject,"mpeg")%>
                        <%= Beeldbankmvc.Helpers.Tools.writeMovieDownloadLink(Model.MediaObject,"mp3")%>
                        <%= Beeldbankmvc.Helpers.Tools.writeMovieDownloadLink(Model.MediaObject,"xml")%>
                        <%= Beeldbankmvc.Helpers.Tools.writeMovieDownloadLink(Model.MediaObject,"srt")%>
                        <%= Beeldbankmvc.Helpers.Tools.writeMovieDownloadLink(Model.MediaObject,"c srt")%>
                        &nbsp;
                    </dd>
                <%
                }
                else
                { %>
                    <dt class="display-label">Foto</dt>
                    <dd class="display-field">
                        <a href="<%="/MediaService/[600-" + Model.MediaObject.FileNummer.ToString() %>]" class="lightbox">
                            <%=Url.Image<HomeController>(c => c.DisplayDetail(Model.MediaObject.Id.ToString()), 300, AppHelper.convertHtmlStringToAltTag(Model.MediaObject))%>
                        </a>
                    </dd>
                <%
                } %>

                <dt class="display-label">Omschrijving</dt>
                <dd class="display-field"><%= Model.MediaObject.Omschrijving%></dd>
                <dt class="display-label">Realisatie</dt>
                <dd class="display-field">
                    <% 
                        DateTime dt1 = new DateTime(1900, 01, 01);
                        DateTime dt2 = Convert.ToDateTime(Model.MediaObject.Datum_Realisatie);
                        if (DateTime.Compare(dt2, dt1) != 0)
                        {
                    %>
                            <%: String.Format("{0:d}", Model.MediaObject.Datum_Realisatie)%>
                    <%
                        }
                        else
                        {
                    %>
                            Onbekend
                    <%
                        }
                    %>
                </dd>
                <%
                if (!String.IsNullOrEmpty(Model.MediaObject.Vervaardiger))
                { %>
                    <dt class="display-label">Vervaardiger</dt>
                    <dd class="display-field"><%: Model.MediaObject.Vervaardiger%></dd>
                <%
                }
                if ((Model.MediaObject.TypeId == (int)Mediatypes.MediaTypes.video_animation) && (!String.IsNullOrEmpty(Model.MediaObject.Montage)))
                { %>
                    <dt class="display-label">Montage</dt>
                    <dd class="display-field"><%: Model.MediaObject.Montage%>&nbsp;</dd>
                <%
                }
                if ((Model.MediaObject.TypeId == (int)Mediatypes.MediaTypes.map_illustration) && (!String.IsNullOrEmpty(Model.MediaObject.Montage)))
                { %>
                    <dt class="display-label">Formaat</dt>
                    <dd class="display-field"><%: Model.MediaObject.Montage%>&nbsp;</dd>
                <%
                }
                if ((Model.MediaObject.TypeId == (int)Mediatypes.MediaTypes.video_animation) && (Model.MediaObject.VideoLengte.HasValue))
                { %>
                    <dt class="display-label">Duur</dt>
                    <dd class="display-field"><%: String.Format("{0:T}", Model.MediaObject.VideoLengte.Value)%>&nbsp;</dd>
                <%
                }
                if ((!String.IsNullOrEmpty(Model.MediaObject.Lokatie)) || (Model.MediaObject.Longitude.HasValue) || (Model.MediaObject.Hoogte.HasValue))
                { %>
                    <dt class="display-label">Locatie</dt>
                    <dd class="display-field">
                        <%
                        if (!String.IsNullOrEmpty(Model.MediaObject.Lokatie))
                        { %>
                            <%: Model.MediaObject.Lokatie%>
                        <%
                        }
                        if ((Model.MediaObject.Longitude.HasValue) && (!String.IsNullOrEmpty(Model.MediaObject.Lokatie)))
                        { %>
                            <br />
                        <%
                        }
                        if (Model.MediaObject.Longitude.HasValue)
                        { %>
                            N&nbsp;<%: Model.MediaObject.Latitude%>&nbsp;&nbsp;E&nbsp;<%: Model.MediaObject.Longitude%>
                        <%
                        } %>
                        <% 
                        if ((Model.MediaObject.Longitude.HasValue) && (Model.MediaObject.Hoogte.HasValue))
                        { %>
                            <br />
                        <%
                        }
                        if (Model.MediaObject.Hoogte > 0)
                        { %>
                            Hoogte:&nbsp;<%: Model.MediaObject.Hoogte%>&nbsp;meter
                        <%
                        } %>
                    </dd>
                <%
                } 
                if (Model.hasRegio())
                { %>
                    <dt class="display-label">Provincie</dt>
                    <dd class="display-field"><%: Model.getRegio()%></dd>
                <%
                } 
                if (Model.hasRiviergebied())
                { %>
                    <dt class="display-label">Riviergebied</dt>
                    <dd class="display-field"><%: Model.getRiviergebied()%></dd>
                <%
                }
                if (Model.hasTechniek())
                { %>
                    <dt class="display-label">Techniek</dt>
                    <dd class="display-field"><%: Model.getTechniek()%></dd>
                <%
                }
                if (Model.hasProject())
                { %>
                    <dt class="display-label">Project</dt>
                    <dd class="display-field"><%: Model.getProject()%></dd>
                <%
                } %>
                <dt class="display-label">Trefwoorden</dt>
                <dd class="display-field">
                <%
                    if (!String.IsNullOrEmpty(Model.MediaObject.Trefwoorden)) %>
                    <%: Model.MediaObject.Trefwoorden.Trim().TrimEnd('|') %>&nbsp;
                </dd>
                <dt class="display-label">Thema's</dt>
                <dd class="display-field">
                    <% 
                        String themas = "";
                        foreach (var thema in Model.SelectedCollectionItems.ToList())
                        {
                            themas += " " + thema.Text + " |";
                        }   
                    %>
                    <%=themas.Trim().TrimEnd('|') %>&nbsp;
                </dd>
                <dt class="display-label">Inventaris nr.</dt>
                <dd class="display-field"><%: Model.MediaObject.Titel%>&nbsp;</dd>
                <dt class="display-label">Bronvermelding</dt>
                <dd class="display-field">
                    <%
                    if (themas.Contains("Persfoto"))
                    { %>
                        <cite>Rijkswaterstaat 
                        <%
                        if (!String.IsNullOrEmpty(Model.MediaObject.Vervaardiger))
                        { %>
                            / <%: Model.MediaObject.Vervaardiger%>
                        <%
                        } %>
                         </cite> (rechtenvrij te gebruiken met deze bronvermelding)
                    <%
                    }
                    else
                    { %>
                        <cite>https://beeldbank.rws.nl, Rijkswaterstaat
                        <%
                        if (!String.IsNullOrEmpty(Model.MediaObject.GroepRechten))
                            if (Model.MediaObject.GroepRechten.ToLower() == "redactiervdr")
                            { %>
                                , Ruimte voor de Rivier
                            <% 
                            } %>
                        <%
                        if (!String.IsNullOrEmpty(Model.MediaObject.Vervaardiger))
                        { %>
                            / <%: Model.MediaObject.Vervaardiger%>
                        <%
                        } %>
                    <%
                    } %>
                   </cite>
                </dd>
                <dt class="display-label">Directe link</dt>
                <dd class="display-field">
                    <a href="https://beeldbank.rws.nl/MediaObject/Details/<%: Model.MediaObject.Id%>" title="Link naar mediaobject in Beeldbank Rijkswaterstaat">https://beeldbank.rws.nl/MediaObject/Details/<%: Model.MediaObject.Id%></a>
                </dd>
            </dl>
        </fieldset>
        <% // todo: move this check to the controler/viewmodel
    if (Membership.GetUser() != null)
    { 
        %>
        <div class="mediaObjectDetailReaction">
            <% using (Html.BeginForm())
               {%>
            <p>
                U kunt vragen of opmerkingen over deze pagina versturen via onderstaand formulier. De ingevulde gegevens
                worden opgeslagen voor het beantwoorden van uw vraag en de onderlinge correspondentie.
                Na het afronden van de vraag worden deze gegevens weer periodiek verwijderd uit
                ons systeem. Een nadere toelichting kunt u lezen op <a href="http://www.rijkswaterstaat.nl/footer/privacy.aspx"
                    title="Interne doorverwijzing naar de privacy verklaring van Rijkswaterstaat">de
                    privacy verklaring van Rijkswaterstaat</a>.</p>
            <%: Html.ValidationSummary(true) %>
            <fieldset>
                <legend>Contact formulier</legend>
                <p>
                    <%: Html.LabelFor(model => model.Email)%>
                    <% string Email = (ViewData["Email"] ?? string.Empty) as string;
                        if (!String.IsNullOrEmpty(Email))
                        {%>
                            <%: Html.TextBoxFor(model => model.Email, new { @Value = ViewData["Email"], @readonly = "readonly", @class= "noBorder"})%>
                    <% } else { %>
                            <%: Html.TextBoxFor(model => model.Email, new { @Value = ViewData["Email"] })%>
                    <% } %>
                    <%: Html.ValidationMessageFor(model => model.Email)%>
                </p>
                <p>
                    <%: Html.LabelFor(model => model.Name)%>
                    <% string Name = (ViewData["Name"] ?? string.Empty) as string;
                       if (!String.IsNullOrEmpty(Name))
                        {%>
                            <%: Html.TextBoxFor(model => model.Name, new { @Value = ViewData["Name"], @readonly = "readonly", @class= "noBorder"})%>
                    <% } else { %>
                            <%: Html.TextBoxFor(model => model.Name, new { @Value = ViewData["Name"] })%>
                    <% } %>
                    <%: Html.ValidationMessageFor(model => model.Name)%>
                </p>
                <p>
                    <%: Html.LabelFor(model => model.Telephone)%>
                    <%: Html.TextBoxFor(model => model.Telephone, new { @Value = ViewData["Phone"] })%>
                    <%: Html.ValidationMessageFor(model => model.Telephone)%>
                </p>
                <p>
                    <%: Html.LabelFor(model => model.Message) %>
                    <%: Html.TextAreaFor(model => model.Message, 10, 50, null)%>
                    <%: Html.ValidationMessageFor(model => model.Message) %>
                </p>
                <p>
                    <input type="submit" name="submit" value="Verstuur reactie" class="button" />
                </p>
            </fieldset>
            <% } %>
        </div>
        <% } %>
        <% // todo: move this check to the controler/viewmodel
        if (Membership.GetUser() != null && ((Roles.IsUserInRole("Administrator")) || (Model.MediaObject.modifiedby.ToLower() == Membership.GetUser().UserName.ToLower()) || (Model.MediaObject.createdby.ToLower() == Membership.GetUser().UserName.ToLower())))
        { %>
        <h2>Beheer info</h2>
        <fieldset>
            <legend>Detail info voor beheerders</legend>
            <dl>
                <dt class="display-label">Id</dt>
                <dd class="display-field"><%: Model.MediaObject.Id %>&nbsp;</dd>
                <dt class="display-label">Status</dt>
                <dd class="display-field"><%: Model.getStatusName() %>&nbsp;</dd>
                <dt class="display-label">Type</dt>
                <dd class="display-field"><%: Model.getTypeName() %>&nbsp;</dd>
                <dt class="display-label">Inventaris nr.</dt>
                <dd class="display-field"><%: Model.MediaObject.Titel%>&nbsp;</dd>
                <dt class="display-label">Filenummer</dt>
                <dd class="display-field"><%: Model.MediaObject.FileNummer%>&nbsp;</dd>
                <dt class="display-label clear">In banner</dt>
                <dd class="display-field"><%: Model.MediaObject.UseInBanner%>&nbsp;</dd>
                <dt class="display-label">Gecontroleerd</dt>
                <dd class="display-field"><%: Model.MediaObject.Checked%>&nbsp;</dd>
                <%
                if (!String.IsNullOrEmpty(Model.MediaObject.Collectie))
                { %>
                    <dt class="display-label">Collectie</dt>
                    <dd class="display-field"><%: Model.MediaObject.Collectie%>&nbsp;</dd>
                <%
                } %>
                <%
                if (!String.IsNullOrEmpty(Model.MediaObject.Montage))
                { %>
                    <dt class="display-label">Formaat</dt>
                    <dd class="display-field"><%: Model.MediaObject.Montage%>&nbsp;</dd>
                <%
                } %>
                <dt class="editor-label">Gemaakt door</dt>
                <dd class="editor-field">
                    <%: Model.MediaObject.createdby%>&nbsp;<strong>op</strong>
                    <%: Model.MediaObject.createdat%></dd>
                <dt class="display-label">Gewijzigd door</dt>
                <dd class="display-field">
                    <%: Model.MediaObject.modifiedby%>&nbsp;<strong>op</strong>
                    <%: Model.MediaObject.modifiedat%>&nbsp;</dd>
            </dl>
        </fieldset>
        <%} %>
    </div>
    <%=Beeldbankmvc.Helpers.Stars.render(Model.MediaObject.Id)%>
</asp:Content>
